package com.xbongbong.saas.enums.business;

import lombok.Getter;

/**
 * 精线索页面路由
 *
 * @title: FineCluePageRouteEnum
 * @projectName xbb-pro
 * @description: TODO
 * @author: zhushuainan
 * @date 2021/11/20 18:43
 */
@Getter
public enum FineCluePageRouteEnum {
    /**
     * 找线索
     */
    CONDITIONSEARCH("conditionSearch"),
    /**
     * 查企业 web端
     */
    COMPANYSEARCH_WEB("companyNameSearch"),
    /**
     * 查企业 app端
     */
    COMPANYSEARCH_APP("companySearch"),
    /**
     * 地图检索
     */
    MAPSEARCH("mapSearch"),
    /**
     * 批量查企业
     */
    BATCHSEARCHCOMPAN("batchSearchCompan"),
    /**
     * 独立详情页
     */
    DETAIL("detail");

    private String route;

    FineCluePageRouteEnum(String route) {
        this.route = route;
    }

    public static FineCluePageRouteEnum getByRoute(String route) {
        if (route == null) {
            return null;
        }
        for (FineCluePageRouteEnum routeEnum : values()) {
            if (routeEnum.getRoute().equals(route)) {
                return routeEnum;
            }
        }
        return null;
    }

}
